package com.woniuxy.stage3demo.service.gy.Impl;

import com.woniuxy.stage3demo.bean.gy.CollectionLogBean;
import com.woniuxy.stage3demo.mapper.gy.OverdueCollectionLogMapper;
import com.woniuxy.stage3demo.service.gy.OverdueCollectionLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**查询催收信息
 * @author ：苟杨
 * @description：TODO
 * @date ：2020/12/11 9:32
 */
@Transactional(readOnly = true)
@Service
public class OverdueCollectionLogServiceImpl implements OverdueCollectionLogService {
    @Resource
    private OverdueCollectionLogMapper overdueCollectionLogMapper;
    //查询用户的所有催收信息
    @Override
    public List<CollectionLogBean> findAll(int id) {
        return overdueCollectionLogMapper.findAll(id);
    }
    //催收信息增加表
    @Transactional(isolation=Isolation.REPEATABLE_READ,rollbackFor = Exception.class)
    @Override
    public void add(CollectionLogBean collectionLogBean) {
    overdueCollectionLogMapper.add(collectionLogBean);
    }
}
